#!/bin/bash

set -e

SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
cd $SCRIPTPATH

XMLFile="../PluginsAndFeatures/azure-toolkit-for-intellij/resources/META-INF/plugin.xml"

git checkout -- $XMLFile
javac XMLHelper.java
java XMLHelper $XMLFile '//idea-plugin/version/text()' "-${1}" "JOIN" "true"
